/*
wellbye：这个文件是自动生成的，不要手工修改！ 
*/
using System;
using ILRuntime.CLR.Method;
using ILRuntime.Other;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;

[ILRAdaptor]
public class ILRAdaptor_UITableViewSource : CrossBindingAdaptor
{
    public override Type BaseCLRType { get { return typeof(UIKit.UITableViewSource); } }
    public override Type AdaptorType { get { return typeof(Adaptor); } }

    public override object CreateCLRInstance(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
    {
        return new Adaptor(appDomain, instance); //创建一个新的实例
    }

    //实际的适配器类需要继承你想继承的那个类，并且实现CrossBindingAdaptorType接口
    public class Adaptor : UIKit.UITableViewSource, CrossBindingAdaptorType
    {
        ILTypeInstance instance;
        ILRuntime.Runtime.Enviorment.AppDomain appDomain;

        public Adaptor() { }

        public Adaptor(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
        {
            this.appDomain = appDomain;
            this.instance = instance;
        }

        public ILTypeInstance ILInstance { get { return instance; } }

        
        
        IMethod methodGetCell0;
        bool isCallingGetCell0= false;
        
            public override UIKit.UITableViewCell GetCell(UIKit.UITableView p0, Foundation.NSIndexPath p1) 
            { 
                if (methodGetCell0 == null && instance!=null )
                {
                    methodGetCell0 = instance.Type.GetMethod("GetCell", 2);
                }
                if (methodGetCell0 != null && !isCallingGetCell0)
                {
                    isCallingGetCell0 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodGetCell0, instance, param );
                        
                        
                        isCallingGetCell0 = false;

                        
                        return (UIKit.UITableViewCell)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In GetCell *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(UIKit.UITableViewCell);
                        
                    

                }
            }
        
        
        
        IMethod methodRowDeselected1;
        bool isCallingRowDeselected1= false;
        
            public override void RowDeselected(UIKit.UITableView p0, Foundation.NSIndexPath p1) 
            { 
                if (methodRowDeselected1 == null && instance!=null )
                {
                    methodRowDeselected1 = instance.Type.GetMethod("RowDeselected", 2);
                }
                if (methodRowDeselected1 != null && !isCallingRowDeselected1)
                {
                    isCallingRowDeselected1 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodRowDeselected1, instance, param );
                        
                        
                        isCallingRowDeselected1 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In RowDeselected *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                        
                    

                }
            }
        
        
        
        IMethod methodRowHighlighted2;
        bool isCallingRowHighlighted2= false;
        
            public override void RowHighlighted(UIKit.UITableView p0, Foundation.NSIndexPath p1) 
            { 
                if (methodRowHighlighted2 == null && instance!=null )
                {
                    methodRowHighlighted2 = instance.Type.GetMethod("RowHighlighted", 2);
                }
                if (methodRowHighlighted2 != null && !isCallingRowHighlighted2)
                {
                    isCallingRowHighlighted2 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodRowHighlighted2, instance, param );
                        
                        
                        isCallingRowHighlighted2 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In RowHighlighted *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                        
                    

                }
            }
        
        
        
        IMethod methodRowSelected3;
        bool isCallingRowSelected3= false;
        
            public override void RowSelected(UIKit.UITableView p0, Foundation.NSIndexPath p1) 
            { 
                if (methodRowSelected3 == null && instance!=null )
                {
                    methodRowSelected3 = instance.Type.GetMethod("RowSelected", 2);
                }
                if (methodRowSelected3 != null && !isCallingRowSelected3)
                {
                    isCallingRowSelected3 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodRowSelected3, instance, param );
                        
                        
                        isCallingRowSelected3 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In RowSelected *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                        
                    

                }
            }
        
        
        
        IMethod methodRowUnhighlighted4;
        bool isCallingRowUnhighlighted4= false;
        
            public override void RowUnhighlighted(UIKit.UITableView p0, Foundation.NSIndexPath p1) 
            { 
                if (methodRowUnhighlighted4 == null && instance!=null )
                {
                    methodRowUnhighlighted4 = instance.Type.GetMethod("RowUnhighlighted", 2);
                }
                if (methodRowUnhighlighted4 != null && !isCallingRowUnhighlighted4)
                {
                    isCallingRowUnhighlighted4 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodRowUnhighlighted4, instance, param );
                        
                        
                        isCallingRowUnhighlighted4 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In RowUnhighlighted *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                        
                    

                }
            }
        
        
        
        IMethod methodRowsInSection5;
        bool isCallingRowsInSection5= false;
        
            public override System.nint RowsInSection(UIKit.UITableView p0, System.nint p1) 
            { 
                if (methodRowsInSection5 == null && instance!=null )
                {
                    methodRowsInSection5 = instance.Type.GetMethod("RowsInSection", 2);
                }
                if (methodRowsInSection5 != null && !isCallingRowsInSection5)
                {
                    isCallingRowsInSection5 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodRowsInSection5, instance, param );
                        
                        
                        isCallingRowsInSection5 = false;

                        
                        return (System.nint)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In RowsInSection *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(System.nint);
                        
                    

                }
            }
        
        
    }
}